package com.moonshineproject.plugin.settings.vo
{
	import com.moonshineproject.plugin.settings.ISettingsProvider;
	import com.moonshineproject.plugin.settings.renderers.PathRenderer;
	
	import mx.core.IVisualElement;
	
	public class PathSetting extends AbstractSetting
	{
		[Bindable]
		public var directory:Boolean;
		
		public function PathSetting(provider:Object, name:String, label:String, directory:Boolean, path:String=null)
		{
			super();
			this.provider = provider;
			this.name = name;
			this.label = label;
			this.directory = directory;
			defaultValue = stringValue = (path != null) ? path : stringValue ? stringValue :"";
		}
		
		override public function get renderer():IVisualElement
		{
			var rdr:PathRenderer = new PathRenderer();
			rdr.setting = this;
			return rdr;
		}
		
	}
}